#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
int main()
{
	int i = 0;
	for (i = 10000; i < 100000; i++)
	{
		int count = 5;
		int result = 0;
		while (count)
		{
			int x1 = 0;
			int x2 = 0;
			x1 = i / (int)pow(10, count-1);
			x2 = i % (int)pow(10, count-1);
			result = result +x1*x2;
			count--;
		}
		if (i == result)
			printf("%d ", i);
	}
	return 0;
}